/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nominalitzacions.ui;

import java.io.FileNotFoundException;
import java.io.IOException;
import nominalitzacions.domain.LanguageDomainController;

/**
 *
 * @author genis.sole
 */
public class LanguageViewController {
    private LanguageDomainController LDC;
    private LanguageView mainLV;

    public LanguageViewController() throws FileNotFoundException {
        LDC = new LanguageDomainController();
        mainLV = new LanguageView(this);
    }

    public void ReturnToMain() {
        mainLV.setVisible(false);
    }

    public void setVisible() {
        mainLV.setVisible(true);
    }

    public void Enable() {
        mainLV.setEnabled(true);
    }

    public void Unenable() {
        mainLV.setEnabled(false);
    }

    public String [] getLanguagesNames() {
        return LDC.getLanguageNames();
    }

    public void addLanguage(String langName, String infPath, String irrPath,
                            String nounsPath, String corpPath) throws IOException {
        LDC.addLanguage(langName, infPath, irrPath, nounsPath, corpPath);
    }

    public void deleteLanguage(String langName) {
        LDC.deleteLanguage(langName);
    }

    public String getInfPath(String langName) {
        return LDC.getInfPath(langName);
    }

    public String getIrrPath(String langName) {
        return LDC.getIrrPath(langName);
    }

    public String getNounsPath(String langName) {
        return LDC.getNounsPath(langName);
    }

    public String getCorpPath(String langName) {
        return LDC.getCorpPath(langName);
    }

    public boolean containsLang(String langName) {
        return LDC.containsLang(langName);
    }
    
}
